<template>
  <el-dialog
    title="车辆启用"
    :visible="isShow"
    width="30%"
    @close="close"
  >
    <div>
      <span>确定要停用吗？车辆启用要满足以下条件</span>
      <div style="margin-top: 20px;">1.车辆信息已完善 </div>
      <div style="margin-top: 20px;">2.绑定司机，且有排班</div>

    </div>
    <span slot="footer" class="dialog-footer">
      <el-button @click="close">取 消</el-button>
      <el-button type="primary" @click="confirm">确 定</el-button>
    </span>
  </el-dialog>
</template>

<script>
import { Enable } from '../../api/carList'
export default {
  name: 'IsOperate',
  props: {
    isShow: {
      type: Boolean,
      default: false
    },
    operateId: {
      type: Number,
      default: null
    }
  },
  methods: {
    close() {
      this.$emit('update:isShow', false)
    },
    async confirm() {
      await Enable(this.operateId)
      this.$message.success('启用成功')
    }
  }

}
</script>

<style>

</style>
